/**
 * Project: ameba.dal
 * 
 * File Created at 2015年12月29日
 * $Id$
 * 
 * Copyright 2015 dface.cn Croporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * dface Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with www.dface.cn
 */
package cn.dface.ameba.dal.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.dface.ameba.dal.entity.ApplicationApiDo;
import cn.dface.ameba.dal.entity.EnumApiUsage;

/**
 * ApplicationApiDAO
 * 
 * @author LVZY
 */
public interface ApplicationApiDAO extends CrudDAO<ApplicationApiDo> {

    List<ApplicationApiDo> retriveByAppVersionId(Integer appVersionId);

    void deleteByAppVersionId(Integer appVersionId);
    
    void deleteByAppVersionIds(List<Integer> appVersionIds);

    Integer countByAppVersionId(@Param("appVersionId") Integer appVersionId,
                                @Param("usage") Integer usage,
                                @Param("fuzzyTitle") String fuzzyTitle);

    List<ApplicationApiDo> retriveByAppVersionIdAndPage(@Param("appVersionId") Integer appVersionId,
                                                        @Param("usage") Integer usage,
                                                        @Param("fuzzyTitle") String fuzzyTitle,
                                                        @Param("start") Integer start,
                                                        @Param("end") Integer end);

}
